public class DAY0102 {
    public static void main(String[] args) {
        MyThread t=new MyThread();
        t.start();

        Thread t1=new Thread(new MyRunnable());
        t1.start();
    }


}
class MyThread extends Thread {
    public void run(){
        System.out.println("该线程要运行的代码");
    }
}

class MyRunnable implements Runnable{
    public void run(){
        System.out.println("线程运行的代码");
    }
}